home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-04-10 | 2.2 KB | 97 lines | [TEXT/KAHL] |
- /*
- interfaces for a simple, multi-window graphics shell
-
- ©1990 - 1992 Apple Computer, Inc.
- All rights reserved.
-
- 3/24/94 - dmh - general cleanup/debugging.
- */
-
- /* the following are expected to be initialized by the application */
-
- //all shapes.c:
-
- extern Rect gWindowQDRect;
- extern Str255 gWindowTitle;
- extern Boolean gDebugging;
- extern Boolean gGiveMeValidation;
- extern long gGraphicsHeapSize;
-
- //graphics shell.c:
-
- extern Boolean gQuitting;
-
-
- /* the following functions are supplied by the application using the shell and are called at the appropriate time. */
-
-
- /**------ Function Prototypes -----**/
-
- //graphics shell(modified).c:
-
- void main(void);
- void MyDoEvent(EventRecord *theEvent);
- void EventLoop(void);
- void MyDoEvent(EventRecord *theEvent);
- OSErr MyPrintingEventOverride(EventRecord *anEvent, Boolean filterEvent);
-
- //all shapes w/printing.c:
-
- OSErr DoInitialization(WindowPtr);
- void DoDraw(WindowPtr);
- OSErr DoCreateNew(void);
- void DoDispose(WindowPtr);
- void DoIdle(WindowPtr);
- void CreateSampleImage(WindowPtr);
-
- //misc.c:
-
- void DoMenuCommand(long menuResult);
- gxJob GetDocJob(WindowPtr);
- gxShape GetDocShape(WindowPtr);
-
- //printing.c:
-
- void SetUpEditMenuRec(gxEditMenuRecord *);
- OSErr DoFormat(WindowPtr, gxDialogResult *);
- OSErr DoPrinting(WindowPtr);
- OSErr DoPrintLoop(WindowPtr);
- OSErr DoPrintOneCopy(WindowPtr);
- OSErr MyReplaceCollectionItem(void *newData, long collectSize,
- OSType collectType, long collectID,
- Collection whichCollection,
- Ptr *oldData, long *oldDataSize);
-
-
- // resource & menu item equates:
-
- #define rMenuBar 128
- #define mApple 128
- #define iAbout 1
-
- #define mFile 129
- #define iNew 1
- #define iOpen 2
- #define iClose 3
- #define iSave 4
- #define iPageSetup 6
- #define iPrint 7
- #define iPrintOne 8
- #define iQuit 10
-
- #define mEdit 130
- #define iUndo 1
- #define iCut 3
- #define iCopy 4
- #define iPaste 5
- #define iClear 6
-
-
- // This is the structure we use to hold our private data for each window. We store a handle to one of these beasties
- // in each window's refCon field.
-
- typedef struct {
- gxJob docJob; // print job for this document.
- gxShape docPage; // page gxShape description for this document.
- } T_Doc, *TP_Doc, **TH_Doc;
-